﻿@*@if (Request.IsAuthenticated) {
	<li>
        @using (Html.BeginForm("LogOff", "SGAccount", FormMethod.Post, new { id = "logoutForm" }))
		{
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }
    </li>
} else {
        <li>@Html.ActionLink("Register", "Register", "SGAccount", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "SGAccount", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
}*@
@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated) {
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "" })) {
        @Html.AntiForgeryToken()

        <ul class="">
            <li>
                @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "AccountManage", routeValues: null, htmlAttributes: new { title = "Manage" })
            </li>
            <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
        </ul>
    }
}
else {
    <ul class="">
        <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
